# Maintainer: Sergej Pupykin <arch+pub@sergej.pp.ru>

pkgname=psi-l10n
pkgver=1.5
pkgrel=3
pkgdesc="Language packs for Psi"
arch=('any')
url="https://psi-im.org"
license=('GPL2')
depends=('psi')
makedepends=('qt5-tools')
options=('!strip' '!zipman')
source=("$pkgname-$pkgver.tar.gz::https://github.com/psi-im/psi-l10n/archive/$pkgver.tar.gz")
sha256sums=('a5f127dcf44b8d3a9f5de16823f4002937727fa5d6cb54ccbca631dd96db4632')

build() {
	cd psi-l10n-$pkgver/translations
	for langfile in *.ts; do
		lrelease-qt5 "$langfile"
	done
}

package() {
	cd psi-l10n-$pkgver/translations
	install -v -dm755 "$pkgdir/usr/share/psi/translations"
	install -v -m644 *.qm "$pkgdir/usr/share/psi/translations"
}
